<?php

	$this->Html->script(array('flexigrid.pack','jquery.maskedinput-1.2.2.min','maskinput','somente-numeros'), false);
	$this->Html->css('flexigrid', null, array('inline' => false));
	
	$matricula_id = $this->request->data['Matricula']['id'];
	
	echo '<fieldset><legend>Matrícula Atual do(a) Aluno(a):</legend>';
	echo '<table>';
	echo '<tr><td>Ano:</td><td><b>' . $this->request->data['Matricula']['ano'] . '</b></td></tr>';
	echo '<tr><td>Aluno(a):</td><td><b>' . $this->request->data['Aluno']['nome'] . '</b></td></tr>';
	echo '<tr><td>Série:</td><td><b>' . $this->request->data['TipoSerie']['nome'] . '</b></td></tr>';
	echo '</table>';
	echo '</fieldset>';
	
	echo '<fieldset><legend>Trocar para:</legend>';
	echo $this->Form->create('Matricula', array('onsubmit' => 'return valida();'));
	echo $this->Form->input('id');
	echo $this->Form->input('aluno_id', array('type' => 'hidden'));
	echo $this->Form->input('ano', array('type' => 'hidden'));
	echo $this->Form->input('tipo_serie_id', array('type' => 'select', 'options' => $series, 'label' => __('Série')));
	echo $this->Form->input('turma_id', array('type' => 'select', 'options' => $turmas, 'label' => __('Turmas')));
	echo '<div class="botoes_form">';
	echo $this->Form->button('Trocar Série', array('type' => 'submit'));
	echo $this->Form->button('Voltar', array('type'=>'button', 'onClick' => "javascript:location='{$this->request->base}/{$this->request->controller}/matriculas'"));
	echo '</div>'; 
	echo $this->Form->end();
	echo '</table>';
?>

<script>

	function valida() {

		return true;
	}

</script>